import { Controller, Post, Body } from '@nestjs/common';
import { OrderDto, OrderEditDto, TokenInfo } from './order.dto';
import { OrderService } from './order.service'


@Controller('lender/order')
export class OrderController {
    constructor(private readonly orderService: OrderService) { }

    @Post('add')
    async add(@Body() orderInfo: OrderDto) {
        return await this.orderService.add(orderInfo);
    }

    @Post('edit')
    async edit(@Body() orderInfo: OrderEditDto) {
        return await this.orderService.edit(orderInfo);
    }

    @Post('reApply')
    async reApply(@Body() tokenInfo: TokenInfo) {
        return await this.orderService.reApply(tokenInfo);
    }
}